<?php session_start();
validaAcesso();
echo "<h2>Cadastro de ".$_SESSION["menu"]["cad"][4]." da UH: {$_SESSION["NOME_HOSTEL_"]}</h2>";

require_once"funcoes/hostel_bloco.jsp";

if(isset($_GET[grava])==1){
    
    setBloco(0,$_POST["pnome"], $_SESSION["ID_HOSTEL_"]);
}

?>

<form method="POST" action="index.jsp?grava=1&cad=4" autocomplete="off">
<div class='item'><h5>Bloco / Andar / Divis&atilde;o:</h5><input type="text" size="40" maxlength="40" name="pnome"> Ex: interno, externo, &aacute;rea, 1o andar, etc</div>
<br>
<div class='item'><h5>&nbsp;</h5><input type="submit" value="cadastrar"></div>

</form>


<?php
getBloco(0,"lista");
?>